package com.log.util;

import org.apache.shardingsphere.core.strategy.keygen.SnowflakeShardingKeyGenerator;

/**
 * @ClassDescription:
 * @Author: zhaoyi
 * @Created: 2024/7/12 14:24
 */
public class IDUtil {

    private static SnowflakeShardingKeyGenerator shardingKeyGenerator = new SnowflakeShardingKeyGenerator();

    /**
     * 雪花算法生成器
     * @return
     */
    public static Comparable<?> geneSnowFlakeID(){

        return shardingKeyGenerator.generateKey();
    }
}
